package logurs

import "gopkg.in/natefinch/lumberjack.v2"

type Option func(logger *lumberjack.Logger)

func WithFilename(fileName string) Option {
	return func(logger *lumberjack.Logger) {
		logger.Filename = fileName
	}
}

func WithMaxSize(maxSize int) Option {
	return func(logger *lumberjack.Logger) {
		logger.MaxSize = maxSize
	}
}

func WithMaxAge(maxAge int) Option {
	return func(logger *lumberjack.Logger) {
		logger.MaxAge = maxAge
	}
}

func WithMaxBackups(maxBackups int) Option {
	return func(logger *lumberjack.Logger) {
		logger.MaxBackups = maxBackups
	}
}

func WithCompress(compress bool) Option {
	return func(logger *lumberjack.Logger) {
		logger.Compress = compress
	}
}

func WithLocalTime(localTime bool) Option {
	return func(logger *lumberjack.Logger) {
		logger.LocalTime = localTime
	}
}
